<?php
/* @var $this \yii\web\View */
/* @var $content string */
use yii\helpers\Html;
use frontend\assets\AppAsset;
AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode($this->title) ?></title>
    <!-- Bootstrap core CSS -->
    <link href="/modules/css/bootstrap.min.css" rel="stylesheet">
    <link href="/modules/css/bootstrap-reset.css" rel="stylesheet">
    <!--Animation css-->
    <link href="/modules/css/animate.css" rel="stylesheet">
    <!--Morris Chart CSS -->
    <link rel="stylesheet" href="/modules/assets/morris/morris.css">
    <!-- sweet alerts -->
    <link href="/modules/assets/sweet-alert/sweet-alert.min.css" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="/modules/css/style.css" rel="stylesheet">
    <link href="/modules/css/helper.css" rel="stylesheet">
    <!--icon -->
    <link href="/css/icon/style.css" rel="stylesheet">
    <!-- 自己的css -->
    <link href="/css/main.css?v=1.0" rel="stylesheet">
    <link href="/css/wxq.css?v=1.0" rel="stylesheet">

    <link href="/css/dyl.css" rel="stylesheet">
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
    <script src="/modules/js/html5shiv.js"></script>
    <script src="/modules/js/respond.min.js"></script>
    <![endif]-->
    <script src="/modules/js/jquery.js"></script>
    <!-- seajs -->
    <script type="text/javascript" src="/modules/assets/layer/layer.min.js" ></script>

    <script type="text/javascript" src="/static/sea.js"></script>
    <script>seajs.config({base:'/static/js/'})</script>
    <script type="text/javascript">
        // layer.config({
        //     extend: 'extend/layer.ext.js'
        // });
        var $_GET = (function(){
            var url = window.document.location.href.toString();
            url = url.replace(location.hash, '');
            var u = url.split("?");
            if(typeof(u[1]) == "string"){
                u = u[1].split("&");
                var get = {};
                for(var i in u){
                    var j = u[i].split("=");
                    get[j[0]] = j[1];
                }
                return get;
            } else {
                return {};
            }
        })();
    </script>
</head>
<body>
<div id="header-nav" class="common-header">
    <div class="inner">
        <div class="nav-left fl">
            <div class="jiosc-logo">
               <a href="/site/index"> <img src="/image/logo.png" style="width: 80px"></a>
               <!-- <a href="/site/index">集客多多</a> -->
                <span class="line"></span>
                <span class="action-name"></span>				
            </div>
        </div>
        <div class="nav-right fr">
            <div class="unauthenticated fr" style="display: inline-block;">
                <a class="nav-btn register boxapleybtn" href="javascript:;">申请试用</a>
                <a  class="nav-btn login" href="/site/login">企业登录 </a>
            </div>
            <div class="nav-list fr">
                <ul>
                    <li class="nav-item index"><a href="/site/index">首页</a></li>
                    <li class="nav-item collectgust"><a href="/site/collectgust">集客</a></li>
                    <li class="nav-item gustmange"><a href="/site/gustmange">客户管理</a></li>
                    <li class="nav-item project"><a href="/site/project">行业方案</a></li>
                    <li class="nav-item community"><a href="/site/community">商家社区</a></li>
                    <li class="nav-item cooperation"><a href="/site/cooperation">咨询合作</a></li>
                </ul>
            </div>
        </div>
    </div>
</div>
<div style="height: 78px;"></div>
<?php $this->beginBody() ?>
<div class="wrap">
    <?= $content ?>
</div>
<?php $this->endBody() ?>
<div class=" footer_all">
    <div class="auto">
        <div class="overfolw">
            <div class="fl">
                <div class="fl">
                    <div class="footer_sm">
                        <div><img src="/image/ewm.png"></div>
                        <div style="margin-top: 0.5rem;">集客多多<br>改变营销推广生态</div>
                    </div>
                </div>
                <div class="fl footer_li">
                    <div>平台介绍</div>
                    <ul>
                        <li><a href="/site/about">关于我们</a></li>
                        <li><a href="/site/index">集客多多平台</a></li>
                        <li><a href="/site/contactus">联系我们</a></li>
                    </ul>
                </div>
                <div class="fl footer_li">
                    <div>产品方案</div>
                    <ul>
                        <li><a href="/site/index">功能清单</a></li>
                        <li><a href="/site/index">产品介绍</a></li>
                        <li><a href="/site/download">下载中心</a></li>
                        <li><a href="/site/suggest">产品建议</a></li>
                    </ul>
                </div>
                <div class="fl footer_li">
                    <div>商务合作</div>
                    <ul>
                        <li><a href="/site/index">询价方式</a></li>
                        <li><a href="/site/index">我是企业商家</a></li>
                        <li><a href="/site/index">渠道招商</a></li>
                        <li><a href="/site/index">友情链接</a></li>
                    </ul>
                </div>
                <div class="clear"></div>
            </div>
            <div class="fr">
                <div class="footer_sm fl">
                    <div><img src="/image/ewm.png"></div>
                    <div style="margin-top: 0.5rem;">下载集客多多APP</div>
                </div>
                <div class="footer_sm fl" style="margin-right: 0px;">
                    <div><img src="/image/ewm.png"></div>
                    <div style="margin-top: 0.5rem;">关注公众号自媒体</div>
                </div>
                <div class="clear"></div>
            </div>
        </div>
        <div class="call">快速客服电话：40012318933</div>
    </div>
</div>
<!--  首页 申请试用-->
<div class="aply_box">
    <div class="aply_ms">
        <p>申请3天试用版</p>
        <div>您可申请试用集客多多3天，体验整体APP和后台的集客功能，3天期限有任何问题均可安排培训师为您答疑解惑。</div>
    </div>
    <div>
        <div class="aply_input">
            <span class="tit">申请人姓名</span>
            <span class="input"><input type="text" name="" class="Name"></span>
        </div>
        <div class="aply_input">
            <span class="tit">公司名称</span>
            <span class="input"><input type="text" name="" class="ComName"></span>
        </div>
        <div class="aply_input">
            <span class="tit">职位</span>
            <span class="input"><input type="text" name="" class="Position"></span>
        </div>
        <div class="aply_input">
            <span class="tit">联系电话</span>
            <span class="input"><input type="text" name="" class="Phone"></span>
        </div>
        <div class="aply_input">
            <span class="tit">所属行业</span>
            <span class="input">
                <select class="ComIndustry">
                    <option value="0">-- 请选择 -- </option>
                    <option value="100">计算机/互联网</option>
                    <option value="110">日用杂货/家电</option>
                    <option value="120">商业服务</option>
                    <option value="130">工业/工业品</option>
                    <option value="140">金融/保险</option>
                    <option value="150">教育/出国</option>
                    <option value="160">生活服务</option>
                    <option value="170">鞋服/工艺品/奢侈品</option>
                    <option value="180">媒体/广告/出版</option>
                    <option value="190">房产/装修/租售</option>
                    <option value="200">医疗/整形整容</option>
                    <option value="210">美食餐饮</option>
                    <option value="220">旅行/出行</option>
                    <option value="230">美容/保健</option>
                    <option value="240">手机数码/通讯服务</option>
                    <option value="250">汽车/汽配/租赁</option>
                    <option value="260">休闲娱乐</option>
                    <option value="270">政府机关/社会组织</option>
                </select>
            </span>
        </div>
        <div class="aply_input" >
            <span class="tit">公司所在地</span>
            <span class="input"><input type="text" class="ComAdd"></span>
        </div>
        <div class="aply_input">
            <span class="tit"></span>
            <span class="input"><button class="nav-btn aply_boxbtn">提交</button></span>
        </div>
    </div>
    <img src="/image/close.png" class="aplyclose_box">
</div>
<div id="mask"></div>
<div id="MaskInfo" ></div>
<div id="Aplpsuccess" style="display: none;">
    <div class="p_Blankpages">
      <div class="p_Blankpages2">
        <div class="p_blank_ico">
           <span class="icon-select" style="font-size:50px;color:#FB4155"></span>
        </div>
        <div class="p_blank_hist">您的申请已经提交成功,耐心等待工作人员联系！</div>
          <div class="p_blank_btn " style="height: 30px;line-height: 30px;width: 40%;cursor: pointer;" >完成</div>
      </div>
    </div>
</div>


</body>
<script type="text/javascript">
    // 点击关闭
    $('.aplyclose_box').click(function(){
        $('.aply_box').hide();
        $('#mask').hide();
    })
    $('.boxapleybtn').click(function(){
        $('.aply_box').show();
        $('#mask').show();
    })
    var MaskInfo = function(des,icon,fadeout){
        var  fadeouts = fadeout ? fadeout : 1500;
        var  str = '<div class="login-modal dialog">\
                      <div class="login-modal-wraper">\
                          <div class="login-modal-wrap animatedfade bounceIn">\
                              <div class="login-modal-cont">\
                                  <p>\
                                      <span class="icon '+ icon +'" style="color: #fff;"></span>\
                                      <span class="login-modal-alert">'+ des +'</span>\
                                  </p>\
                              </div>\
                          </div>\
                      </div>\
                  </div>'
        $('#MaskInfo').html(str);
        setTimeout(function(){
          $('#MaskInfo').html('');
        },fadeouts)
    }
    var hist = function(content,ico,id,size,btn){
          if(!btn){
              btn = {href:'',des:''}
          }
          var histhtml='<div class="p_Blankpages">\
                          <div class="p_Blankpages2">\
                            <div class="p_blank_ico">\
                               <span class="'+ico+'" style="font-size:'+size+'"></span>\
                            </div>\
                            <div class="p_blank_hist">'+content+'</div>'
                            if(btn.href && btn.des){
                              histhtml+='<div class="p_blank_btn skips" data-src="'+btn.href+'" >'+btn.des+'</div>'
                            }
                          histhtml+='</div>\
                        </div>';
           $(id).html(histhtml);
    }
    $('.aply_boxbtn').click(function(){
        var data = {
            Name: $('.Name').val(),
            Phone: $('.Phone').val(),
            Position: $('.Position').val(),
            ComName: $('.ComName').val(),
            ComIndustry: $('.ComIndustry').val(),
            ComAdd: $('.ComAdd').val(),
        }
        if(parseInt(data.ComIndustry) == 0){
            data.ComIndustry = '';
        }
        if($.trim(data.Phone) == ''){
            MaskInfo('手机号不能为空！');
            return false;
        }
        var re = /^1[0-9]{10}$/;
        if(!re.test(data.Phone)){
            MaskInfo('手机号码格式不正确！');
            return false;
        }
        $.ajax({
            type: "POST",
            url: "/site/aply",
            data:data,
            dataType: "json",
            success: function (ret) {
                if(ret.IsBizSuccess){
                    $('.aply_box').hide();
                    $('#Aplpsuccess').fadeIn();
                    return false;
                }else{
                    MaskInfo(ret.ErrMsg);
                    return false;
                }
            }
        });
    })
    $('#Aplpsuccess .p_blank_btn').click(function(){
        $('#Aplpsuccess').hide();
        $('.aply_box').hide();
        $('#mask').hide();
    })
</script>
</html>
<?php $this->endPage() ?>